package com.neu.controller;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.neu.domain.CheckProject;
import com.neu.service.CheckProjectService;
import com.neu.utils.JsonModel;

@Controller
@RequestMapping("/check")
public class CheckProjectController {
	
	@Resource(name="checkProjectService")
	private CheckProjectService checkProjectService;
	
	@RequestMapping("/findAllCheckProject")
	@ResponseBody
	public JsonModel findAllCheckProject() {
		JsonModel jsonModel=new JsonModel();
		List<CheckProject> checkProjectList=checkProjectService.findAllCheckProject();
		jsonModel.setData(checkProjectList);
		return jsonModel;
		
	}
	
	
	@RequestMapping("/findCheckProjectById")
	@ResponseBody
	public JsonModel findCheckProjectById(Integer projectid) {
		JsonModel jsonModel=new JsonModel();
		CheckProject checkProject=checkProjectService.findCheckProjectById(projectid);
		jsonModel.setData(checkProject);
		return jsonModel;
		
	}
}
